---
title: Case consolidation
summary: Merge secondary legal cases into a primary case.
status: draft
owner: SAIF Documentation Generator
last_reviewed: 2026-08-26
library: SAIF.Business.Claim.Legal
reference_type: embedded
operation_id: case-consolidation
trigger: A caller invokes ConsolidateCases(DPI) with a selected primary and secondary case set
---

# Case consolidation

Merges one or more secondary legal cases into a primary case, propagating shared state (schedules,
notes, file locations) from the primary case to each secondary case.

| Field | Value |
| --- | --- |
| **Operation ID** | case-consolidation |
| **Trigger** | `ConsolidateCases(DPI)` call |
| **Inputs** | Selected case DPI list (primary case plus one or more secondary cases) |
| **Outputs** | Consolidated case record, copied schedules/notes/file locations |
| **Primary components** | `clsConsolidations.ConsolidateCases` |
| **Entry point** | `SAIF.Business.Claim.Legal\LegalNet\clsConsolidations.vb` |

## Steps

1. Caller constructs a `clsConsolidations` instance with the primary legal case ID and the collection
   of secondary case IDs to merge.
2. `ConsolidateCases(DPI)` validates the consolidation set contains at least two cases
   ([BR-CO-001](../business-rules.md#br-co-001-a-consolidation-must-contain-at-least-two-cases)).
3. Each secondary case's shared state (file location, LCE, and related child records) is updated to
   match the primary case.

## Process flow

```mermaid
flowchart TD
	Start(["ConsolidateCases<br>called"]) --> Check{"At least 2<br>cases selected?"}
	Check -->|No| Err(["Validation error"])
	Check -->|Yes| Merge["Propagate primary case<br>state to each secondary<br>case"]
	Merge --> EndOk(["Consolidation<br>complete"])
```

## Failure and edge-case behavior
- Fewer than two selected cases fails validation before any merge is attempted.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)

## Sources
- `SAIF.Business.Claim.Legal\LegalNet\clsConsolidations.vb`
